/*
** my_strncpy.c for my_strncpy in /home/boulah_m//jour_06**
** Made by moustafa boulahia
** Login   <boulah_m@epitech.net>
**
** Started on  Mon Oct 10 10:06:17 2011 moustafa boulahia
** Last update Tue Feb  7 16:43:14 2012 moustafa boulahia
*/
#include "my.h"

char	*my_strncpy(char *dest, char *src, int n)
{
  int	c;

  c = 0;
  while (src[c] != '\0' && c <n)
    {
      dest[c] = src[c];
      c = c + 1;
    }
  if (c < n)
    {
      dest[c] = '\0';
    }
  return (dest);
}
